<?php

if (!defined("IN_OP"))
{
    exit("You can't access this file directly...");
}
require_once( "class_3d/CheckMode_3d.php" );
$gametype = intval(getvar("gametype"));
$bettypegroup = getvar("palygroup");
require_once( "class_3d/RateConfig_3d.php" );
$RateConfig_3d = new RateConfig_3d($gametype);
if ($bettypegroup == "" || !isset($RateConfig_3d->playGroupArr[$bettypegroup]))
{
    $ui->showErrorPage("不正确的{$tblName}玩法页面");
    exit();
}
$chk = new CheckMode_3d($curruser['acl'], 3, $gametype);
$chk->checkShow3dPage();
$show3D3S = $chk->show3D3S;
$show5N = getShow35($gametype);
$betname_3d = judge_type($gametype);
$palygroup=getvar("palygroup");
unset($chk);
$tbl = $g_gametype_3d[$gametype]['en'];
$tblName = $g_gametype_3d[$gametype]['ch'];

$ui = new UI_3D(true);
$ui = new UI(true,'',true);
$tpl = new Template_Member();
$tpl->load(array("main" => "ssc/".$palygroup.".tpl", "menu" => "ssc/ssc_menu.tpl","header"=>"game_header.tpl","foot"=>"game_foot.tpl"));
$tpl->set("gametype",$gametype);
$tpl->set($palygroup,"class='select'");
$tpl->show("menu");
$tpl->set('tblName',$tblName);
if ($curruser['enabled'] != 1)
{
    $ui->showErrorPage("<p class=error>帐号已被暂停使用</p>");
    exit();
}
include_once( "BetChk.php" );

$BetChk = new BetChk($today, $gametype);
$lotto_3d = $BetChk->chkBetDate(date("Y-m-d"));
$open = $lotto_3d['open'];
$round = $lotto_3d['round'];
$lotto_id = $lotto_3d['id'];
$stopbet =$lotto_3d['stopbet'];

$tpl->set("cchinayear", intval($conf->get("chinayear")));
$t1 = strtotime($stopbet);
$tpl->Set("timestap", $t1 - systime());
$tpl->set("phptime", systime());
$tpl->set("open", $open);
$tpl->set("round", d3($round));
$tpl->set("lotto_id", $lotto_id);
$tpl->set("gametype",$gametype);
$tpl->set("betName",$RateConfig_3d->playtypeArr[$bettypegroup]);
$tpl->set("changetype",'<input type="button" class="btn btn-primary" style="height:25px; width:40px; color:#FFFFFF;" name="sub_a" value="勾选" id="sub_a" onclick="ChangeSelType(1)" >&nbsp;<input type="button" class="btn btn-primary" style="height:25px; width:40px; color:#FFFFFF;" name="sub_b" value="快选" id="sub_b" onclick="ChangeSelType(2)" >');
$select_disk = getUserValidDiskSelect($curruser, "RefRate()");
$tpl->set("select_disk", $select_disk);
$disk = $g_disk_code[getUserValidDisk($curruser)];
$tpl->show("header");
$tpl->show("main");
$tpl->show("foot");
?>